#ifndef _XML_INTERFACE_H_
#define _XML_INTERFACE_H_

#include "types.h"

/*
 * XPATH documentation:
 * http://www.w3schools.com/xpath/xpath_syntax.asp
*/

typedef stuct
{
  void *xml_node;
  void *xml_instance;
  void *xml_doc_instance;
}xml_node_t;

BOOL xml_get_root_node(const uin8_t *file_name, xml_node_t *pnode);
BOOL xml_get_first_child(const xml_node_t *parent_node, xml_node_t *child_node);
BOOL xml_get_next_sibling(const xml_node_t *base_node, xml_node_t *sibling);

void xml_get_node_name(const xml_node_t *pnode, uint8_t *buffer, uint16_t max_len);
void xml_get_text_node_name(const xml_node_t *pnode, uint8_t *buffer, uint16_t max_len);

void xml_get_node_attribute(const xml_node_t *pnode, const uint8_t *attr_name, uint8_t *attr_val_buf, uint8_t max_val_len);

#endif

